Field of the Invention
The present invention relates to an image processing apparatus, an imaging apparatus, and a method for controlling an image processing apparatus.
Description of the Related Art
Panning is a photographing technique used to realize a speed feeling of a moving subject. In panning, a photographer pans a camera in accordance with the movement of a subject so that a moving subject is stopped and the background is caused to flow.
It is necessary for the photographer to perform panning in accordance with the movement of a subject in panning photographing, but an image has a blurred subject image in some cases when there is a difference between a moving speed of the subject and the panning speed. A technique for absorbing a difference between a moving speed of a subject and a panning speed due to the movement of a shift lens has been proposed as a technique for assisting a user performing panning photographing. Japanese Patent Laid-Open No. 2006-317848 discloses a configuration in which panning photographing is performed by detecting a subject from blur detection of a gyro sensor and a motion vector of an image, calculating an amount of correction for locating the detected subject at a center of the image, and performing correction is performed using the movement of an optical axis shift lens.
A technique for detecting a motion vector by comparing continuously photographed images has been proposed as a technique for detecting a motion vector from an image. Japanese Patent Laid-Open No. 8-88855 discloses a technique for comparing pixel values of reference blocks and candidate blocks to be subjected to block matching for detecting motion vectors while shifting a position of a candidate block within a search area. Furthermore, as a system for detecting a motion vector, there is a system for acquiring an image signal used for photometry using a photometric sensor of a penta part before photographing and processing the image signal.
However, in the technique disclosed in Japanese Patent Laid-Open No. 8-88855, since an amount of movement of a subject increases when a sampling interval of continuously photographed images increases, vector detection cannot be performed accurately unless a comparison area between a reference block and a candidate block in a continuous image is enlarged. On the other hand, when the comparison area is enlarged, a processing time for motion vector detection is prolonged resulting in a process in which a real time property is insufficient.